# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=perl-io-socket-ssl
_pkgreal=IO-Socket-SSL
pkgver=2.068
pkgrel=0
pkgdesc="Nearly transparent SSL encapsulation for IO::Socket::INET"
url="https://metacpan.org/release/IO-Socket-SSL"
arch="noarch"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="ca-certificates perl-net-libidn perl-net-ssleay"
makedepends="perl-dev"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/S/SU/SULLR/IO-Socket-SSL-$pkgver.tar.gz"
builddir="$srcdir/$_pkgreal-$pkgver"
options="!check" # FIXME: check hangs occationally

prepare() {
	default_prepare

	PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
}

build() {
	make
}

check() {
	make test
}

package() {
	make DESTDIR="$pkgdir" install
	find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
}

sha512sums="9bccce1a85d24a4e06394a7a0eb8c1c834a71d1fecf99e3a7c0fea1828dcad0da24768bfe0db996d70f3e153135fc958d85ae65fab300ebfd8b520441aa27cfa  IO-Socket-SSL-2.068.tar.gz"
